﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.LiveFX.Client;
using System.Linq.Dynamic;
using Microsoft.LiveFX.ResourceModel;

namespace LiveFrameworkExplorer.Plugins.SearchPlugin
{
    public partial class ucSearchComposition : UserControl
    {
        private ILFEBase _lfeBase = null;
        private LiveOperatingEnvironment _liveFx = null;

        public ucSearchComposition()
        {
            InitializeComponent();
        }

        public void Init(ILFEBase lfeBase)
        {
            _lfeBase = lfeBase;
            _liveFx = _lfeBase.GetLiveOperatingEnvironment();
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (comboBox1.SelectedValue as string)
            { 
                case "Contacts":
                    
                    break;
                case "Profiles":

                    break;
                case "Mesh":

                    break;
            }
        }

        private void propertyGrid1_SelectedObjectsChanged(object sender, EventArgs e)
        {
            var obj = propertyGrid1.SelectedObject.GetType();
            foreach (var prop in obj.GetProperties())
            {
                var value = prop.GetValue(propertyGrid1.SelectedObject, null);
            }
        }

        //private LiveQuery<TMeshItem> CreateQuery<TMeshItem>() where TMeshItem : LiveItem, new()
        //{

        //}
    }
}
